<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>tango.net.http.HttpHeaders</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "tango.net.http.HttpHeaders";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/tango.net.http.HttpHeaders.html" class="symbol">tango.net.http.HttpHeaders</a></h1>
  
<p class="sec_header">License:</p>BSD style: see <a href="http://www.dsource.org/projects/tango/wiki/LibraryLicense">license.txt</a>
<p class="sec_header">Version:</p>Initial release: April 2004
<p class="sec_header">Author:</p>Kris
<dl>
<dt class="decl">struct <a class="symbol _struct" name="HeaderElement" href="./htmlsrc/tango.net.http.HttpHeaders.html#L31" kind="struct" beg="31" end="35">HeaderElement</a>; <a title="Permalink to this symbol" href="#HeaderElement" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L31">#</a></dt>
<dd class="ddef">
<div class="summary">Exposes freachable HttpHeader instances</div>
</dd>
<dt class="decl">class <a class="symbol _class" name="HttpHeadersView" href="./htmlsrc/tango.net.http.HttpHeaders.html#L44" kind="class" beg="44" end="224">HttpHeadersView</a> : HttpTokens; <a title="Permalink to this symbol" href="#HttpHeadersView" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L44">#</a></dt>
<dd class="ddef">
<div class="summary">Maintains a set of input headers. These are placed into an input
        buffer and indexed via a HttpStack.</div>
<dl>
<dt class="decl"><a class="symbol _ctor" name="HttpHeadersView.this" href="./htmlsrc/tango.net.http.HttpHeaders.html#L58" kind="ctor" beg="58" end="66">this</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#HttpHeadersView.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L58">#</a></dt>
<dd class="ddef">
<div class="summary">Construct this set of headers, using a HttpStack based
                upon a ':' delimiter</div></dd>
<dt class="decl"><a class="symbol _ctor" name="HttpHeadersView.this:2" href="./htmlsrc/tango.net.http.HttpHeaders.html#L74" kind="ctor" beg="74" end="77">this</a><span class="params">(HttpHeadersView <em>source</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeadersView.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L74">#</a></dt>
<dd class="ddef">
<div class="summary">Clone a source set of HttpHeaders</div></dd>
<dt class="decl">HttpHeadersView <a class="symbol _function" name="HttpHeadersView.clone" href="./htmlsrc/tango.net.http.HttpHeaders.html#L85" kind="function" beg="85" end="88">clone</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#HttpHeadersView.clone" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L85">#</a></dt>
<dd class="ddef">
<div class="summary">Clone this set of HttpHeadersView</div></dd>
<dt class="decl">void <a class="symbol _function" name="HttpHeadersView.parse" href="./htmlsrc/tango.net.http.HttpHeaders.html#L97" kind="function" beg="97" end="104">parse</a><span class="params">(IBuffer <em>input</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeadersView.parse" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L97">#</a></dt>
<dd class="ddef">
<div class="summary">Read all header lines. Everything is mapped rather 
                than being allocated &amp; copied</div></dd>
<dt class="decl">char[] <a class="symbol _function" name="HttpHeadersView.get" href="./htmlsrc/tango.net.http.HttpHeaders.html#L113" kind="function" beg="113" end="116">get</a><span class="params">(HttpHeaderName <em>name</em>, char[] <em>def</em> = null)</span>; <a title="Permalink to this symbol" href="#HttpHeadersView.get" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L113">#</a></dt>
<dd class="ddef">
<div class="summary">Return the value of the provided header, or null if the
                header does not exist</div></dd>
<dt class="decl">int <a class="symbol _function" name="HttpHeadersView.getInt" href="./htmlsrc/tango.net.http.HttpHeaders.html#L125" kind="function" beg="125" end="128">getInt</a><span class="params">(HttpHeaderName <em>name</em>, int <em>def</em> = -1)</span>; <a title="Permalink to this symbol" href="#HttpHeadersView.getInt" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L125">#</a></dt>
<dd class="ddef">
<div class="summary">Return the integer value of the provided header, or -1 
                if the header does not exist</div></dd>
<dt class="decl">Time <a class="symbol _function" name="HttpHeadersView.getDate" href="./htmlsrc/tango.net.http.HttpHeaders.html#L137" kind="function" beg="137" end="140">getDate</a><span class="params">(HttpHeaderName <em>name</em>, Time <em>def</em> = Time.epoch)</span>; <a title="Permalink to this symbol" href="#HttpHeadersView.getDate" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L137">#</a></dt>
<dd class="ddef">
<div class="summary">Return the date value of the provided header, or Time.epoch 
                if the header does not exist</div></dd>
<dt class="decl">int <a class="symbol _function" name="HttpHeadersView.opApply" href="./htmlsrc/tango.net.http.HttpHeaders.html#L150" kind="function" beg="150" end="164">opApply</a><span class="params">(int delegate(inout HeaderElement) <em>dg</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeadersView.opApply" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L150">#</a></dt>
<dd class="ddef">
<div class="summary">Iterate over the set of headers. This is a shell around
                the superclass, where we can convert the HttpToken into 
                a HeaderElement instead.</div></dd>
<dt class="decl">FilteredHeaders <a class="symbol _function" name="HttpHeadersView.createFilter" href="./htmlsrc/tango.net.http.HttpHeaders.html#L174" kind="function" beg="174" end="177">createFilter</a><span class="params">(HttpHeaderName <em>header</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeadersView.createFilter" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L174">#</a></dt>
<dd class="ddef">
<div class="summary">Create a filter for iterating of a set of named headers.
                We have to create a filter since we can't pass additional
                arguments directly to an opApply() method.</div></dd>
<dt class="decl">class <a class="symbol _class" name="HttpHeadersView.FilteredHeaders" href="./htmlsrc/tango.net.http.HttpHeaders.html#L185" kind="class" beg="185" end="223">FilteredHeaders</a> : FilteredTokens; <span class="attrs">[<span class="prot">private</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#HttpHeadersView.FilteredHeaders" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L185">#</a></dt>
<dd class="ddef">
<div class="summary">Filter class for isolating a set of named headers.</div>
<dl>
<dt class="decl"><a class="symbol _ctor" name="HttpHeadersView.FilteredHeaders.this" href="./htmlsrc/tango.net.http.HttpHeaders.html#L194" kind="ctor" beg="194" end="197">this</a><span class="params">(HttpHeadersView <em>headers</em>, HttpHeaderName <em>header</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeadersView.FilteredHeaders.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L194">#</a></dt>
<dd class="ddef">
<div class="summary">Construct a filter upon the specified headers, for
                        the given header name.</div></dd>
<dt class="decl">int <a class="symbol _function" name="HttpHeadersView.FilteredHeaders.opApply" href="./htmlsrc/tango.net.http.HttpHeaders.html#L207" kind="function" beg="207" end="221">opApply</a><span class="params">(int delegate(inout HeaderElement) <em>dg</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeadersView.FilteredHeaders.opApply" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L207">#</a></dt>
<dd class="ddef">
<div class="summary">Iterate over all headers matching the given name. 
                        This wraps the HttpToken iterator to convert the 
                        output into a HeaderElement instead.</div></dd></dl></dd></dl></dd>
<dt class="decl">class <a class="symbol _class" name="HttpHeaders" href="./htmlsrc/tango.net.http.HttpHeaders.html#L236" kind="class" beg="236" end="340">HttpHeaders</a> : HttpHeadersView; <a title="Permalink to this symbol" href="#HttpHeaders" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L236">#</a></dt>
<dd class="ddef">
<div class="summary">Maintains a set of output headers. These are held in an output
        buffer, and indexed via a HttpStack. Deleting a header could be 
        supported by setting the HttpStack entry to null, and ignoring
        such values when it's time to write the headers.</div>
<dl>
<dt class="decl"><a class="symbol _ctor" name="HttpHeaders.this" href="./htmlsrc/tango.net.http.HttpHeaders.html#L245" kind="ctor" beg="245" end="249">this</a><span class="params">(IBuffer <em>output</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeaders.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L245">#</a></dt>
<dd class="ddef">
<div class="summary">Construct output headers, using the provided buffer as
                a place to stash the header content.</div></dd>
<dt class="decl"><a class="symbol _ctor" name="HttpHeaders.this:2" href="./htmlsrc/tango.net.http.HttpHeaders.html#L257" kind="ctor" beg="257" end="260">this</a><span class="params">(HttpHeaders <em>source</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeaders.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L257">#</a></dt>
<dd class="ddef">
<div class="summary">Clone a source set of HttpHeaders</div></dd>
<dt class="decl">HttpHeaders <a class="symbol _function" name="HttpHeaders.clone" href="./htmlsrc/tango.net.http.HttpHeaders.html#L268" kind="function" beg="268" end="271">clone</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#HttpHeaders.clone" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L268">#</a></dt>
<dd class="ddef">
<div class="summary">Clone this set of HttpHeaders</div></dd>
<dt class="decl">void <a class="symbol _function" name="HttpHeaders.add" href="./htmlsrc/tango.net.http.HttpHeaders.html#L280" kind="function" beg="280" end="283">add</a><span class="params">(HttpHeaderName <em>name</em>, void delegate (IBuffer) <em>dg</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeaders.add" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L280">#</a></dt>
<dd class="ddef">
<div class="summary">Add the specified header, and use a callback to provide
                the content.</div></dd>
<dt class="decl">void <a class="symbol _function" name="HttpHeaders.add:2" href="./htmlsrc/tango.net.http.HttpHeaders.html#L291" kind="function" beg="291" end="294">add</a><span class="params">(HttpHeaderName <em>name</em>, char[] <em>value</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeaders.add:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L291">#</a></dt>
<dd class="ddef">
<div class="summary">Add the specified header and text</div></dd>
<dt class="decl">void <a class="symbol _function" name="HttpHeaders.addInt" href="./htmlsrc/tango.net.http.HttpHeaders.html#L302" kind="function" beg="302" end="305">addInt</a><span class="params">(HttpHeaderName <em>name</em>, int <em>value</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeaders.addInt" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L302">#</a></dt>
<dd class="ddef">
<div class="summary">Add the specified header and integer value</div></dd>
<dt class="decl">void <a class="symbol _function" name="HttpHeaders.addDate" href="./htmlsrc/tango.net.http.HttpHeaders.html#L313" kind="function" beg="313" end="316">addDate</a><span class="params">(HttpHeaderName <em>name</em>, Time <em>value</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeaders.addDate" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L313">#</a></dt>
<dd class="ddef">
<div class="summary">Add the specified header and long/date value</div></dd>
<dt class="decl">bool <a class="symbol _function" name="HttpHeaders.remove" href="./htmlsrc/tango.net.http.HttpHeaders.html#L325" kind="function" beg="325" end="328">remove</a><span class="params">(HttpHeaderName <em>name</em>)</span>; <a title="Permalink to this symbol" href="#HttpHeaders.remove" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L325">#</a></dt>
<dd class="ddef">
<div class="summary">Remove the specified header header. Returns false if not 
                found.</div></dd>
<dt class="decl">IBuffer <a class="symbol _function" name="HttpHeaders.getOutputBuffer" href="./htmlsrc/tango.net.http.HttpHeaders.html#L336" kind="function" beg="336" end="339">getOutputBuffer</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#HttpHeaders.getOutputBuffer" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/tango.net.http.HttpHeaders.html#L336">#</a></dt>
<dd class="ddef">
<div class="summary">Return the output buffer provided during construction.</div></dd></dl></dd></dl>
</div>
<div id="footer">
  <p>Copyright (c) 2004 Kris Bell. All rights reserved</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 04:03:56 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>